import request from "@/utils/request";
// 权限列表
export function getAuth(data) {
  return request({
    url: "/auth",
    method: "get",
    data,
  });
}
// 获取角色信息
export function getRoles() {
  return request({
    url: "/position",
    method: "get",
  });
}

export function addRole(data) {
  return request({
    url: "/position",
    method: "post",
    data,
  });
}

export function updateRole(data) {
  return request({
    url: `/position`,
    method: "put",
    data,
  });
}

export function deleteRole(id) {
  return request({
    url: `/position?id=${id}`,
    method: "delete",
  });
}
